// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import components from './components/'

import iView from 'iview';
import 'iview/dist/styles/iview.css';

import './assets/scss/main.scss';

import methods from './util/addMethods';

Vue.use(methods);
Vue.use(iView);

// http://47.100.4.239:8098/manage/toLogin
// 登录请求参数
/* let param = {
  manageAccount: this.username,
  managePassword: this.password
}; */

Vue.prototype.$http = axios

Vue.config.productionTip = false

Object.keys(components).forEach(key => {
    var name = key.replace(/(\w)/, (v) => v.toUpperCase()); //首字母大写
    Vue.component(`v${name}`, components[key]);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
